<include file="public@head" />
</head>

<body>
    <div class="layui-fluid wrap js-check-wrap" id="component-tabs">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">角色管理</div>
                    <div class="layui-card-body">
                        <div class="layui-tab">
                            <ul class="layui-tab-title">
                                <li><a href="{:url('rbac/index')}">{:lang('ADMIN_RBAC_INDEX')}</a></li>
                                <li><a href="{:url('rbac/roleadd')}">{:lang('ADMIN_RBAC_ROLEADD')}</a></li>
                                <li class="layui-this"><a>编辑角色</a></li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <form class="layui-form js-ajax-form" role="form" action="{:url('rbac/roleEditPost')}" method="post">
                                        <div class="layui-form-item">
                                            <label for="input-name" class="layui-form-label"><span style="color:#ff5722;">*</span>{:lang('ROLE_NAME')}</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" id="input-name" name="name" value="{$data.name}">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label for="input-remark" class="layui-form-label">{:lang('ROLE_DESCRIPTION')}</label>
                                            <div class="layui-input-block">
                                                <textarea type="text" class="layui-textarea" id="input-remark" name="remark">{$data.remark}</textarea>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">{:lang('STATUS')}</label>
                                            <div class="layui-input-block">
                                                <php>$active_true_checked=($data['status']==1)?"checked":"";</php>
                                                <input type="radio" name="status" value="1" {$active_true_checked} title="{:lang('ENABLED')}">
                                                <php>$active_false_checked=($data['status']==0)?"checked":"";</php>
                                                <input type="radio" name="status" value="0" {$active_false_checked} title="{:lang('DISABLED')}">
                                            </div>
                                        </div>
                                        <div class="layui-form-item layui-layout-admin">
                                            <div class="layui-input-block">
                                                <div class="layui-footer" style="left: 0;">
                                                    <input type="hidden" name="id" value="{$data.id}"/>
                                                    <button type="submit" class="layui-btn js-ajax-submit" data-refresh="0">{:lang('SAVE')}</button>
                                                    <a class="layui-btn layui-btn-primary" href="{:url('rbac/index')}">{:lang('BACK')}</a>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <include file="public@footer" />
</body>

</html>